﻿using System;
using System.IO;
using System.Security;
using System.Text.RegularExpressions;

class RemoveOddNumbers
{
    static void Main()
    {
        try
        {
            using (StreamReader input = new StreamReader("input.txt"))
            {
                int counter = 1;
                string currentLine;
                
                using (StreamWriter output = new StreamWriter("output.txt"))
                {
                    while ((currentLine = input.ReadLine()) != null)
                    {
                        if (counter % 2 == 0)
                        {
                            output.WriteLine(currentLine);
                        }
                        counter++;
                    }

                }
            }
            File.Delete("input.txt");
            File.Copy("output.txt", "input.txt");
        }
        catch (FileNotFoundException)
        {
            Console.WriteLine("Cannot find this file");
        }
        catch (DirectoryNotFoundException)
        {
            Console.WriteLine("Invalid Folder ");
        }
        catch (PathTooLongException)
        {
            Console.WriteLine("The path is too long");
        }
        catch (UnauthorizedAccessException)
        {
            Console.WriteLine("You don`t have access!");
        }
        catch (NotSupportedException)
        {
            Console.WriteLine("Cannot open this file!");
        }
        catch (SecurityException)
        {
            Console.WriteLine("Not enough permission to open file!");
        }
    }
}